<div id="sidebar">

<ul id="sidebarwidgeted">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) : ?>



<li id="search" class="widget widget_search">
<form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
<label class="hidden" for="s">站内搜索：</label>
<div><input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
</li>

<li id="catlist">
<div class="widget">
<h3>文章分类</h3>    
<ul>
<?php wp_list_cats('sort_column=id&optioncount=1&hide_empty=0'); ?>
</ul>
</div>
</li>

<li id="recent-posts">
<div class="widget">
<h3>最新文章</h3>
<ul>
<?php wp_get_archives('type=postbypost&limit=8'); ?> 
</ul>
</div>
</li>	

<li id="tag-cloud">
<div class="widget">
<h3>标签云</h3>
<?php wp_tag_cloud('smallest=12&largest=24&unit=px&number=50&orderby=count&order=DESC'); ?>
</div>
</li>


<li id="links">

<div class="widget">

<h3>友情链接</h3>

<ul>

<?php wp_list_bookmarks('title_li=&categorize=0'); ?>

</ul>

</div>

</li>

<li id="meta">
<div class="widget">
<h3>网站管理</h3>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</div>
</li>  

<?php endif; ?>
</ul>

</div>
